Pod::Spec.new do |spec|

  # spec的名字，同podfile中指定依赖的名字一致。
  spec.name         = "ios-swift-thirdlibrary"
  # 版本号，同podfile中指定依赖的版本号一致。
  spec.version      = "1.0.2"
  # 简要描述
  spec.summary      = "iOSd d集合"
  # 描述，一般要比summary长度长些，否则pod lint时会有警告。非强制性。
  spec.description  = <<-DESC
                      iOS基类库集合
                   DESC
  # 主页地址，一般指向github地址即可                 
  spec.homepage     = "http://gitcode.lietou.com/dev28/framework/ios/ios-swift-thirdlibrary.git"
  # 截图，一般不需要
  # spec.screenshots  = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif"
  # 许可证，一般为MIT或BSD 3-clause,默认MIT即可
  spec.license      = "MIT"
  # 指定许可证的另一种方式
  # spec.license      = { :type => "MIT", :file => "FILE_LICENSE" }
  # 作者介绍 左边为名字，邮编为联系方式或者主页
  spec.author             = { "徐文超" => "xuwc@liepin.com" }
  # 指定使用系统平台
  # spec.platform     = :ios
  # 指定使用系统平台以及系统版本号
  spec.platform     = :ios, "8.0"
  # 是否采用arc，一般默认为true
  spec.requires_arc = true
  # 指定库的使用方式，一般swift必须指定该项为true
  spec.static_framework = true
  # 指定swift版本号
  spec.swift_version = '5.0'
  # 指定module名字，一般swift使用时必须指定,注意不能使用-，要改为下划线_
  spec.module_name   = 'ios_swift_thirdlibrary'

  # 当使用多个平台时，可如下指定，一共就4个平台。ios,osx,watchos,tvos
  # spec.ios.deployment_target = "8.0"
  # spec.osx.deployment_target = "10.7"
  # spec.watchos.deployment_target = "2.0"
  # spec.tvos.deployment_target = "9.0"

  # 指定核心依赖库，开启后，仅加载指定的子库
  # spec.default_subspecs = 'Core'

  # 下载资源远程仓库路径，tag为版本号，可手动指定，也可与spec版本保持一致。
  spec.source       = { :git => "http://gitcode.lietou.com/dev28/framework/ios/ios-swift-thirdlibrary.git", :tag => "#{spec.version}" }
  # 类资源文件，为ios-swift-tools.git根目录算起,一般为这样设置即可
  spec.source_files  = "classes/*"
  # 非下载的文件集合，一般用于readme.md等无需下载的资源使用
  # spec.exclude_files = "classes/*.md"

  # 对外开放的头文件
  spec.public_header_files = "classes/*.h"
  # 私有文件，不暴露给外界使用
  #spec.private_header_files = "Classes/PrivateHeaders/*.h"

  # 资源文件路径，此资源被直接使用
  # spec.resource  = "icon.png"
  # spec.resources = "Resources/**/*.png"

  # 资源文件指定，会被打包成bundle文件，使用资源时需要指定bundle名字, 一般采用这种
  # spec.resource_bundles = {
  #     'ios-swift-tools' => ['Resources/**/*]
  # }

  # spec.preserve_paths = "FilesToSave", "MoreFilesToSave"

  # 系统动态库依赖方式
  # spec.framework  = "SomeFramework"
  # spec.frameworks = "SomeFramework", "AnotherFramework"

  # 系统静态库依赖方式
  # spec.library   = "iconv"
  # spec.libraries = "iconv", "xml2"

  # 本地提供的静态库依赖方式
  # spec.vendored_libraries = "Classes/**/*.a"

  # 本地提供的动态库依赖方式
  # subspec.ios.vendored_frameworks = "Classes/**/*.framework"

  # 修改工程配置
  # spec.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }

  # 依赖其他第三方库
  # spec.dependency "JSONKit", "~> 1.4"

  # oc与swift混编，提供预编译头文件引用。 
  # spec.prefix_header_contents = '#import "xxx.h"', '#import <UIKit/UIKit.h>'

  spec.pod_target_xcconfig = {
    'OTHER_LDFLAGS' => '-ObjC'
  }

  # *******
  # 将oc文件开放给swift使用，需要在Classes类下面创建ios_swift_tools.h空文件，否则swift将无法找到该方法
  # *******

  # 核心必需组件
  spec.subspec 'core' do | core |
    # 对外开放的头文件
    core.public_header_files = "classes/*.h"
    core.source_files  = "classes/*.{h,m}"
  end


  spec.subspec 'mamap' do | mamap |
    mamap.libraries = 'c++', 'z'
    mamap.frameworks = 'UIKit','QuartzCore','SystemConfiguration','CoreTelephony','Security','CoreLocation','GLKit','ExternalAccessory'
  #只用framework
    mamap.ios.vendored_frameworks = 'classes/mamap/AMapFoundationKit-1.6.0/AMapFoundationKit.framework','classes/mamap/AMapLocationKit-2.6.3/AMapLocationKit.framework','classes/mamap/AMapSearchKit-7.1.0/AMapSearchKit.framework','classes/mamap/MAMapKit-5.6.1/MAMapKit.framework'
    mamap.resources = 'classes/mamap/MAMapKit-5.6.1/MAMapKit.framework/AMap.bundle'
  end

  spec.subspec 'wechat' do | wechat |
    wechat.source_files = 'classes/wechat/1.8.6/*.{h,m}'
    wechat.public_header_files = 'classes/wechat/1.8.6/*.h'
    wechat.prefix_header_contents = '#import "WXApi.h"','#import "WechatAuthSDK.h"'

    wechat.libraries = 'c++', 'z', 'sqlite3.0'
    wechat.frameworks = 'UIKit','QuartzCore','SystemConfiguration','CoreTelephony','Security','CFNetwork','CoreGraphics'
    wechat.ios.vendored_libraries = 'classes/wechat/1.8.6/libWeChatSDK.a'
    wechat.dependency 'ios-swift-thirdlibrary/core'

  end

  spec.subspec 'tingyun' do | tingyun |
    tingyun.libraries = 'z'
    tingyun.frameworks = 'UIKit','WebKit','Security','CoreTelephony','SystemConfiguration'
    tingyun.ios.vendored_frameworks = 'classes/tingyun/2.14.1/tingyunApp.framework'
  end

  spec.subspec 'alipay' do | alipay |
    alipay.libraries = 'c++', 'z'
    alipay.frameworks = 'UIKit','Foundation','QuartzCore','SystemConfiguration','CoreTelephony','CFNetwork','CoreGraphics','CoreText','CoreMotion'
    alipay.ios.vendored_frameworks = 'classes/alipay/15.5.9/AlipaySDK.framework'
    alipay.resources = 'classes/alipay/15.5.9/AlipaySDK.bundle'
  end

  spec.subspec 'face++' do | face |
    face.source_files = 'classes/face++/v2.4.5I/*.{h,m}'
    face.public_header_files = 'classes/face++/v2.4.5I/*.h'

    face.frameworks = 'UIKit','AVFoundation','CoreMedia','CoreMotion'
    face.ios.vendored_frameworks = 'classes/face++/v2.4.5I/MGLivenessDetection.framework','classes/face++/v2.4.5I/MGBaseKit.framework'
    face.resources = 'classes/face++/v2.4.5I/MGLivenessDetectionResource.bundle'
  end

  spec.subspec 'dtshare' do | dtshare |
    dtshare.ios.vendored_frameworks = 'classes/dtshare/3.0.0/DTShareKit.framework'
  end

  spec.subspec 'tyrzsdk' do | tyrzsdk |
    tyrzsdk.frameworks = 'UIKit','Foundation'
    #只用framework
    tyrzsdk.ios.vendored_frameworks = 'classes/tyrzsdk/5.3.9.2/TYRZSDK.framework'
  end

  spec.subspec 'tcwebcode' do | tcwebcode |
    tcwebcode.frameworks = 'UIKit','Foundation'
    #只用framework
    tcwebcode.ios.vendored_frameworks = 'classes/tcwebcode/1.0.5/TCWebCodesSDK.framework'
  end

end